home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 418_04 / transfor.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-02  |  3.9 KB  |  170 lines

  1. /* transfor.h
  2.  * RasMol2 Molecular Graphics
  3.  * Roger Sayle, February 1994
  4.  * Version 2.3
  5.  */
  6.  
  7. #define GroupAttr       0x00
  8. #define ChainAttr       0x01
  9. #define TempAttr    0x02
  10.  
  11. #define MaskColourFlag  0x01
  12. #define MaskRadiusFlag  0x02
  13. #define MaskBothFlag    0x03
  14.  
  15.  
  16. #ifdef EIGHTBIT
  17. #define DefaultAmbient    0.6
  18. #define DefaultColDepth   16
  19. #else
  20. #define DefaultAmbient    0.05
  21. #define DefaultColDepth   32
  22. #endif
  23.  
  24.  
  25. #ifdef IBMPC
  26. #define Colour2Shade(x)  ((int)((x)-1)/ColourDepth)
  27. #define Shade2Colour(x)  ((x)*ColourDepth+1)
  28. #else
  29. #define Colour2Shade(x)  ((int)((x)-6)/ColourDepth)
  30. #define Shade2Colour(x)  ((x)*ColourDepth+6)
  31. #endif
  32.  
  33.  
  34. #ifdef TRANSFORM
  35. Real RotX[3],RotY[3],RotZ[3];
  36. Real MatX[3],MatY[3],MatZ[3];
  37. Real InvX[3],InvY[3],InvZ[3];
  38. Real DirX[3],DirY[3],DirZ[3];
  39. Long CenX, CenY, CenZ;
  40.  
  41. Real Ambient;
  42. Real Scale, MaxZoom;
  43. Real DScale, IScale;
  44. Long SideLen, Offset;
  45. Card WorldRadius, WorldSize;
  46. int FakeSpecular, SpecPower;
  47. int ColourDepth, ColourMask;
  48. int BackR, BackG, BackB;
  49. int XOffset, YOffset;
  50. int UseScreenClip;
  51. int ZoomRange;
  52.  
  53. int Hydrogens, HetaGroups;
  54. int DrawAtoms, MaxAtomRadius;
  55. int DrawBonds, MaxBondRadius;
  56. int DrawRibbon;
  57. int ZoneBoth;
  58.  
  59. #else
  60. extern Real RotX[3],RotY[3],RotZ[3];
  61. extern Real MatX[3],MatY[3],MatZ[3];
  62. extern Real InvX[3],InvY[3],InvZ[3];
  63. extern Real DirX[3],DirY[3],DirZ[3];
  64. extern Long CenX, CenY, CenZ;
  65.  
  66. extern Real Ambient;
  67. extern Real Scale,MaxZoom;
  68. extern Real DScale,IScale;
  69. extern Long SideLen, Offset;
  70. extern Card WorldRadius,WorldSize;
  71. extern int ColourDepth,ColourMask;
  72. extern int FakeSpecular,SpecPower;
  73. extern int BackR,BackG,BackB;
  74. extern int XOffset,YOffset;
  75. extern int UseScreenClip;
  76. extern int ZoomRange;
  77.  
  78. extern int Hydrogens,HetaGroups;
  79. extern int DrawAtoms,MaxAtomRadius;
  80. extern int DrawBonds,MaxBondRadius;
  81. extern int DrawRibbon;
  82. extern int ZoneBoth;
  83.  
  84. #ifdef __STDC__
  85. void SetRadiusValue( int );
  86. void SetRadiusTemperature();
  87. void SetVanWaalRadius();
  88. void DisableSpacefill();
  89. void EnableWireFrame( int, int );
  90. void EnableBackBone( int, int );
  91. void SetHBondStatus( int, int, int );
  92. void SetRibbonStatus( int, int );
  93. void DisableWireFrame();
  94. void DisableBackBone();
  95. void RestrictZone( int );
  96. void SelectZone( int );
  97.  
  98.  
  99. void DefineColourMap();
  100. void ResetColourMap();
  101. void ColourBackNone();
  102. void ColourBondNone();
  103. void ColourHBondNone( int );
  104. void ColourHBondType();
  105. void ColourRibbonNone();
  106. void ColourBackAttrib( int, int, int );
  107. void ColourBondAttrib( int, int, int );
  108. void ColourHBondAttrib( int, int, int, int );
  109. void ColourRibbonAttrib( int, int, int );
  110. void MonoColourAttrib( int, int, int );
  111. void ScaleColourAttrib( int );
  112. void CPKColourAttrib();
  113. void AminoColourAttrib();
  114. void ShapelyColourAttrib();
  115. void StructColourAttrib();
  116. void UserMaskAttrib( int );
  117.  
  118. void DetermineClipping();
  119. void InitialiseTransform();
  120. void InitialTransform();
  121. void PrepareTransform();
  122. void ReviseInvMatrix();
  123. void ApplyTransform();
  124. void ResetTransform();
  125.  
  126. #else /* non-ANSI C compiler */
  127. void SetRadiusValue();
  128. void SetRadiusTemperature();
  129. void SetVanWaalRadius();
  130. void DisableSpacefill();
  131. void EnableWireFrame();
  132. void EnableBackBone();
  133. void SetHBondStatus();
  134. void SetRibbonStatus();
  135. void DisableWireFrame();
  136. void DisableBackBone();
  137. void RestrictZone();
  138. void SelectZone();
  139.  
  140. void DefineColourMap();
  141. void ResetColourMap();
  142. void ColourBackNone();
  143. void ColourBondNone();
  144. void ColourHBondNone();
  145. void ColourHBondType();
  146. void ColourRibbonNone();
  147. void ColourBackAttrib();
  148. void ColourBondAttrib();
  149. void ColourHBondAttrib();
  150. void ColourRibbonAttrib();
  151. void MonoColourAttrib();
  152. void ScaleColourAttrib();
  153. void CPKColourAttrib();
  154. void AminoColourAttrib();
  155. void ShapelyColourAttrib();
  156. void StructColourAttrib();
  157. void UserMaskAttrib();
  158.  
  159. void DetermineClipping();
  160. void InitialiseTransform();
  161. void InitialTransform();
  162. void PrepareTransform();
  163. void ReviseInvMatrix();
  164. void ApplyTransform();
  165. void ResetTransform();
  166.  
  167. #endif
  168. #endif
  169.  
  170.